package net.esj.basic.core.engine.template.impl;

import java.io.Writer;

import net.esj.basic.core.engine.template.AbstractTemplate;

import freemarker.template.Template;

public class FreemarkerTemplate implements AbstractTemplate {

	private Template template;
	
	public FreemarkerTemplate(Template template) {
		super();
		this.template = template;
	}

	public Template getTemplate() {
		return template;
	}

	public void setTemplate(Template template) {
		this.template = template;
	}

	@Override
	public String getEngineType() {
		return "freemarker";
	}

	@Override
	public void process(Object context, Writer writer) throws Exception {
		template.process(context, writer);
	}

}
